/*
 * JsonArray.h
 *
 *  Created on: Jun 3, 2011
 *      Author: ToanNhan
 */

#ifndef JSONARRAY_H_
#define JSONARRAY_H_

#include "JsonValue.h"
#include "vector"
#include "FBase.h"

using namespace std;
using namespace Osp::Base;

class JsonArray : public JsonValue {
public:
	const static mchar beginChar = '[';
	const static mchar endChar = ']';
private:
	vector<JsonValue *> array;
//override
public:
	JsonArray* cloneN();
	String toJsonString();
public:
	JsonArray();
	JsonArray(JsonArray& jsonArray);
	JsonArray& operator =(JsonArray& jsonArray);
	virtual ~JsonArray();

	JsonValue* getValueN(int index);
	void insertValue(JsonValue *jsonValue);
	int getSize(){
		return array.size();
	}
};

#endif /* JSONARRAY_H_ */
